package inseniarlingua.trans.en_ia;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

class SentenceTest 
{
	Sentence cut
	Translator translator

	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
	}

	@AfterClass
	public static void tearDownAfterClass() throws Exception {
	}

	@Before
	public void setUp() throws Exception {
		translator = new Translator()
		cut = new Sentence()
		cut.transMap = translator.getTransMap()
	}

	@After
	public void tearDown() throws Exception {
	}
	
	@Test
	public void testTranslateReg() {
		cut.origSource = "it is seven o'clock"
		cut.translate()
		//println cut.translation
		assertEquals('es septe horas', cut.translation)
	}

	@Test
	public void testTranslate2() {
		cut.origSource = "the living room is very big"
		cut.translate(2)
		cut.translate(1)
		//println cut.translation
		assertEquals('le salon es multo grande', cut.translation)
	}
	
	@Test
	public void testTranslate() {
		cut.origSource = "the living room is very big"
		cut.translate()
		//println cut.translation
		assertEquals('le salon es multo grande', cut.translation)
	}
	
	@Test
	public void testTranslate1() {
		cut.origSource = "the"
		cut.translate()
		assertEquals('le', cut.translation)
	}
	
	@Test
	public void testTranslate6() {
		cut.origSource = "Peter opens the envelope in a hurry"
		cut.translate()
		assertEquals('Peter hasta aperir le invelope', cut.translation)
	}
	
	@Test
	public void testTranslate7() {
		cut.origSource = "he is going to write some articles about the land"
		cut.translate()
		println cut.transPairs
		assertEquals('ille va a scriber qualque articulos super le pais', cut.translation)
	}
}
